package com.jieshuibao.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jieshuibao.mapper.CompanyMapper;
import com.jieshuibao.mapper.UserMapper;
import com.jieshuibao.model.db.Company;
import com.jieshuibao.model.db.User;

@Service
public class ChangeAdminService {
	@Autowired
	private UserMapper userMapper;
	@Autowired
	private CompanyMapper companyMapper;
	
	public void updateComapnyRole(User user1,User user2,Company company){
		userMapper.updateByPrimaryKeySelective(user1);
		userMapper.updateByPrimaryKeySelective(user2);
		companyMapper.updateByPrimaryKeySelective(company);
	}

}
